package router

import (
	"github.com/gin-gonic/gin"
	"lab.com/service"
)

// InitRouter init all the routes and start the engine
func InitRouter() *gin.Engine {

	e := gin.New()

	//Demo
	initDemoRouter(e)

	//科研成就
	initAchievementRouter(e)

	//页面
	e.GET("/page-list", service.GetpageList)
	e.GET("/page-detail", service.GetPageDetial)

	//用户
	e.GET("/user-detail", service.GetUserDetial)
	e.POST("/Login", service.Login)

	return e
}
